<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use dosamigos\ckeditor\CKEditor;

/* @var $this yii\web\View */
/* @var $model backend\models\AudioService */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="audio-service-form">

    <?php $form = ActiveForm::begin(); ?>

    <?= $form->field($model, 'title')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'audio_draft_text')->widget(CKEditor::className(), [
            'options' => ['rows' => 10],
            'preset' => 'custom',
            'clientOptions' =>  [
                'toolbarGroups' => [
                    ['name' => 'clipboard', 'groups' => ['mode', 'undo', 'doctools']],
                    ['name' => 'editing', 'groups' => ['tools']],
                    ['name' => 'paragraph', 'groups' => ['templates', 'list', 'indent', 'align']],
                    ['name' => 'basicstyles', 'groups' => ['basicstyles', 'cleanup']],
                    ['name' => 'links'],
                    ['name' => 'others'],
                ]
            ]
        ])  ?>

    <?= $form->field($model, 'audio_SSML_text')->textarea(['rows' => 12]) ?>

    <p><a href="https://cloud.yandex.ru/docs/speechkit/tts/ssml" target="_blank">Подсказка по использованию SSML (Speech Synthesis Markup Language)</a></p>
    <br>

    <div class="form-group">
        <?= Html::submitButton('Сохранить', ['class' => 'btn btn-success']) ?>
    </div>

    <p class="text-muted">Генерация аудио-файла будет доступна на следующем этапе</p>

    <?php ActiveForm::end(); ?>

</div>
